package com.vint.mi;

/**
 * 知了传导的问题
 */
public class Mi79 {
    public static String solution(String line){
        if(null==line)
            return "0";
        String[] src = line.split(",");
        if(src.length!=3)
            return "0";
        int n = Integer.parseInt(src[0]);
        int k = Integer.parseInt(src[1]);
        int m = Integer.parseInt(src[2]);
        if(k<m)
            return "0";
        int t = (k - m) / 8;
        if(t%2==0)
            return "1";
        else
            return "0";
    }
    public static void main(String[] args) {
        String example1 = "10,25,2";
        String example2 = "10,19,3";
        String example3 = "2550,14012,1596";
        String ret1 = solution(example1);
        String ret2 = solution(example2);
        String ret3 = solution(example3);
        System.out.println(ret1);
        System.out.println(ret2);
        System.out.println(ret3);
    }
}
